From: YAMAMOTO Mitsuharu Date: Mon, 27 Aug 2007 08:31:07 +0000 (+0000) Subject: (x_draw_composite_glyph_string_foreground): Draw rectangle X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~16878 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6b5095df1ae0cb4e3563283cef6482fb497d22bc;p=emacs.git (x_draw_composite_glyph_string_foreground): Draw rectangle for nonexistent or zero-width glyph in composition glyph. --- diff --git a/src/macterm.c b/src/macterm.c index 9655b09c819..0f2b053853d 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -3056,10 +3056,17 @@ x_draw_composite_glyph_string_foreground (s) else { for (i = 0; i < s->nchars; i++, ++s->gidx) - mac_draw_image_string_16 (s->f, s->gc, - x + s->cmp->offsets[s->gidx * 2], - s->ybase - s->cmp->offsets[s->gidx * 2 + 1], - s->char2b + i, 1, 0, s->face->overstrike); + if (mac_per_char_metric (GC_FONT (s->gc), s->char2b + i, 0) == NULL) + /* This is a nonexistent or zero-width glyph such as a + combining diacritic. Draw a rectangle. */ + mac_draw_rectangle (s->f, s->gc, + x + s->cmp->offsets[s->gidx * 2], s->y, + FONT_WIDTH (GC_FONT (s->gc)) - 1, s->height - 1); + else + mac_draw_image_string_16 (s->f, s->gc, + x + s->cmp->offsets[s->gidx * 2], + s->ybase - s->cmp->offsets[s->gidx * 2 + 1], + s->char2b + i, 1, 0, s->face->overstrike); } }